package com.bupt.dao;

import com.bupt.bean.Device;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface DeviceRepository extends JpaRepository<Device,String>, JpaSpecificationExecutor<Device> {


    public Device findByDeviceId(Integer deviceId);

    public Device findByDeviceName(String deviceName);

    public void  deleteByDeviceId(Integer deviceId);

    List<Device> findAllByDeviceTypeId(Integer deviceTypeId);
}
